/**
 * 
 */
package com.googlecode.pcapj;

/**
 * Defines methods to instantiate a packet object.
 */
public interface PacketFactory<T extends Packet> {
	/**
	 * Instantiate a Packet object from a packet header and data.
	 * @param buffer the buffer contains the packet data.
	 * @param offset the start offset.
	 * @param length the length.
	 * @return a Packet object.
	 */
	public T newPacket(byte[] buffer, int offset, int length);
}
